package com.gitee.wsl.ext.collection


import kotlin.math.min


/**
 * Returns [count] number elements from [this]
 */
fun <T> Iterable<T>.randomElements(count: Int): List<T> = shuffled().apply {
    val retCount = min( count , size )
    take(retCount)
}

